package com.chennan.common.domian;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author chennan
 * @createTime 2021年07月29日 16:03:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseData {

    private Object data;

    private Integer code;

    public static ResponseData SCESSES = new ResponseData("成功",200);

    public static ResponseData ERROR = new ResponseData("失败",500);

    public static ResponseData sesscess(Object data){
        return new ResponseData(data,200);
    }

    public static ResponseData error(Object data){
        return new ResponseData(data,500);
    }

}
